package com.samuel.basics.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * <p>
 * 作者信息表
 * </p>
 *
 * @author samuel
 * @since 2021-01-20
 */
@TableName("b_author")
public class AuthorEntity extends BaseEntity {


    private static final long serialVersionUID = 9199537418901910551L;
    /**
     * 真实名称
     */
    @TableField("real_name")
    private String realName;

    /**
     * 昵称
     */
    @TableField("nick_name")
    private String nickName;

    /**
     * 个人描述
     */
    @TableField("descs")
    private String descs;

    /**
     * 性别 1：男 2：女 3：你猜
     */
    @TableField("sex")
    private Integer sex;

    /**
     * 生日日期
     */
    @TableField("birthday")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime birthday;

    /**
     * 地区ID主键
     */
    @TableField("area_id")
    private String areaId;

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }
    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }
    public String getDescs() {
        return descs;
    }

    public void setDescs(String descs) {
        this.descs = descs;
    }
    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }
    public LocalDateTime getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDateTime birthday) {
        this.birthday = birthday;
    }
    public String getAreaId() {
        return areaId;
    }

    public void setAreaId(String areaId) {
        this.areaId = areaId;
    }

    @Override
    public String toString() {
        return "AuthorEntity{" +
            "realName=" + realName +
            ", nickName=" + nickName +
            ", descs=" + descs +
            ", sex=" + sex +
            ", birthday=" + birthday +
            ", areaId=" + areaId +
        "}";
    }
}
